// START SNIPPET: TypeDaoHibernate
package nothing.dao.hibernate;

import nothing.model.Type;
import nothing.dao.TypeDao;
import org.appfuse.dao.hibernate.GenericDaoHibernate;

import java.util.List;

public class TypeDaoHibernate extends GenericDaoHibernate<Type, Long> implements TypeDao {

    public TypeDaoHibernate() {
        super(Type.class);
    }

    @SuppressWarnings("unchecked")
    public List<Type> findByName(String name) {
        return getHibernateTemplate().find("from Type where name=?", name);
    }
}
// START SNIPPET: TypeDaoHibernate

